﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WenConfigEditCode
{
    public static class WenAutoConfig
    {
        public static WenSkin.WenConfig WenConfig = new WenSkin.WenConfig("D:\\CSDATA\\AutoCutRite\\AutoCutRite\\AutoCutRite\\bin\\Debug\\net461", "WenAutoConfig", WenSkin.WenConfig.ConfigFormatEnum.Xml);
        public static class SqlServer
        {
            public static string Server { get => WenConfig["SqlServer", "Server"]; set => WenConfig["SqlServer", "Server"] = value; }
            public static string Database { get => WenConfig["SqlServer", "Database"]; set => WenConfig["SqlServer", "Database"] = value; }
            public static string Uid { get => WenConfig["SqlServer", "Uid"]; set => WenConfig["SqlServer", "Uid"] = value; }
            public static string Pad { get => WenConfig["SqlServer", "Pad"]; set => WenConfig["SqlServer", "Pad"] = value; }
        }
        public static class SoftConfig
        {
            public static string AutoSumCsvPath { get => WenConfig["SoftConfig", "AutoSumCsvPath"]; set => WenConfig["SoftConfig", "AutoSumCsvPath"] = value; }
            public static string AutoSumCsvTime { get => WenConfig["SoftConfig", "AutoSumCsvTime"]; set => WenConfig["SoftConfig", "AutoSumCsvTime"] = value; }
            public static string AutoSumBatchRule { get => WenConfig["SoftConfig", "AutoSumBatchRule"]; set => WenConfig["SoftConfig", "AutoSumBatchRule"] = value; }
            public static string AutoSumCsv { get => WenConfig["SoftConfig", "AutoSumCsv"]; set => WenConfig["SoftConfig", "AutoSumCsv"] = value; }
            public static bool AutoSumCsvB { get => WenConfig["SoftConfig", "AutoSumCsv"] == "是"; set => WenConfig["SoftConfig", "AutoSumCsv"] = value ? "是" : "否"; }
            public static AutoSumCsvEnum AutoSumCsvE { get => (AutoSumCsvEnum)Enum.Parse(typeof(AutoSumCsvEnum), WenConfig["SoftConfig", "AutoSumCsv"]); set => WenConfig["SoftConfig", "AutoSumCsv"] = value.ToString(); }
            public enum AutoSumCsvEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoCutCsv { get => WenConfig["SoftConfig", "AutoCutCsv"]; set => WenConfig["SoftConfig", "AutoCutCsv"] = value; }
            public static bool AutoCutCsvB { get => WenConfig["SoftConfig", "AutoCutCsv"] == "是"; set => WenConfig["SoftConfig", "AutoCutCsv"] = value ? "是" : "否"; }
            public static AutoCutCsvEnum AutoCutCsvE { get => (AutoCutCsvEnum)Enum.Parse(typeof(AutoCutCsvEnum), WenConfig["SoftConfig", "AutoCutCsv"]); set => WenConfig["SoftConfig", "AutoCutCsv"] = value.ToString(); }
            public enum AutoCutCsvEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoCutCsvCol { get => WenConfig["SoftConfig", "AutoCutCsvCol"]; set => WenConfig["SoftConfig", "AutoCutCsvCol"] = value; }
        }
        public static class CutRiteConfig
        {
            public static string CutRiteVersion { get => WenConfig["CutRiteConfig", "CutRiteVersion"]; set => WenConfig["CutRiteConfig", "CutRiteVersion"] = value; }
            public static CutRiteVersionEnum CutRiteVersionE { get => (CutRiteVersionEnum)Enum.Parse(typeof(CutRiteVersionEnum), WenConfig["CutRiteConfig", "CutRiteVersion"]); set => WenConfig["CutRiteConfig", "CutRiteVersion"] = value.ToString(); }
            public enum CutRiteVersionEnum
            {
                V9 = 0,
                V10 = 1,
                V11 = 2,
            }
            public static string OptimizePath { get => WenConfig["CutRiteConfig", "OptimizePath"]; set => WenConfig["CutRiteConfig", "OptimizePath"] = value; }
            public static string UserPath { get => WenConfig["CutRiteConfig", "UserPath"]; set => WenConfig["CutRiteConfig", "UserPath"] = value; }
            public static string SawPath { get => WenConfig["CutRiteConfig", "SawPath"]; set => WenConfig["CutRiteConfig", "SawPath"] = value; }
            public static string SYSIMPPATH { get => WenConfig["CutRiteConfig", "SYSIMPPATH"]; set => WenConfig["CutRiteConfig", "SYSIMPPATH"] = value; }
            public static string SysBakPath { get => WenConfig["CutRiteConfig", "SysBakPath"]; set => WenConfig["CutRiteConfig", "SysBakPath"] = value; }
            public static string EXPORTPATH { get => WenConfig["CutRiteConfig", "EXPORTPATH"]; set => WenConfig["CutRiteConfig", "EXPORTPATH"] = value; }
            public static string EXPORTXLS { get => WenConfig["CutRiteConfig", "EXPORTXLS"]; set => WenConfig["CutRiteConfig", "EXPORTXLS"] = value; }
            public static bool EXPORTXLSB { get => WenConfig["CutRiteConfig", "EXPORTXLS"] == "是"; set => WenConfig["CutRiteConfig", "EXPORTXLS"] = value ? "是" : "否"; }
            public static EXPORTXLSEnum EXPORTXLSE { get => (EXPORTXLSEnum)Enum.Parse(typeof(EXPORTXLSEnum), WenConfig["CutRiteConfig", "EXPORTXLS"]); set => WenConfig["CutRiteConfig", "EXPORTXLS"] = value.ToString(); }
            public enum EXPORTXLSEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string EXPORTMDB { get => WenConfig["CutRiteConfig", "EXPORTMDB"]; set => WenConfig["CutRiteConfig", "EXPORTMDB"] = value; }
            public static bool EXPORTMDBB { get => WenConfig["CutRiteConfig", "EXPORTMDB"] == "是"; set => WenConfig["CutRiteConfig", "EXPORTMDB"] = value ? "是" : "否"; }
            public static EXPORTMDBEnum EXPORTMDBE { get => (EXPORTMDBEnum)Enum.Parse(typeof(EXPORTMDBEnum), WenConfig["CutRiteConfig", "EXPORTMDB"]); set => WenConfig["CutRiteConfig", "EXPORTMDB"] = value.ToString(); }
            public enum EXPORTMDBEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoUpx { get => WenConfig["CutRiteConfig", "AutoUpx"]; set => WenConfig["CutRiteConfig", "AutoUpx"] = value; }
            public static bool AutoUpxB { get => WenConfig["CutRiteConfig", "AutoUpx"] == "是"; set => WenConfig["CutRiteConfig", "AutoUpx"] = value ? "是" : "否"; }
            public static AutoUpxEnum AutoUpxE { get => (AutoUpxEnum)Enum.Parse(typeof(AutoUpxEnum), WenConfig["CutRiteConfig", "AutoUpx"]); set => WenConfig["CutRiteConfig", "AutoUpx"] = value.ToString(); }
            public enum AutoUpxEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoSystem { get => WenConfig["CutRiteConfig", "AutoSystem"]; set => WenConfig["CutRiteConfig", "AutoSystem"] = value; }
            public static bool AutoSystemB { get => WenConfig["CutRiteConfig", "AutoSystem"] == "是"; set => WenConfig["CutRiteConfig", "AutoSystem"] = value ? "是" : "否"; }
            public static AutoSystemEnum AutoSystemE { get => (AutoSystemEnum)Enum.Parse(typeof(AutoSystemEnum), WenConfig["CutRiteConfig", "AutoSystem"]); set => WenConfig["CutRiteConfig", "AutoSystem"] = value.ToString(); }
            public enum AutoSystemEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoAddMat { get => WenConfig["CutRiteConfig", "AutoAddMat"]; set => WenConfig["CutRiteConfig", "AutoAddMat"] = value; }
            public static bool AutoAddMatB { get => WenConfig["CutRiteConfig", "AutoAddMat"] == "是"; set => WenConfig["CutRiteConfig", "AutoAddMat"] = value ? "是" : "否"; }
            public static AutoAddMatEnum AutoAddMatE { get => (AutoAddMatEnum)Enum.Parse(typeof(AutoAddMatEnum), WenConfig["CutRiteConfig", "AutoAddMat"]); set => WenConfig["CutRiteConfig", "AutoAddMat"] = value.ToString(); }
            public enum AutoAddMatEnum
            {
                是 = 0,
                否 = 1,
            }
            public static string AutoDeleteMatSu { get => WenConfig["CutRiteConfig", "AutoDeleteMatSu"]; set => WenConfig["CutRiteConfig", "AutoDeleteMatSu"] = value; }
            public static bool AutoDeleteMatSuB { get => WenConfig["CutRiteConfig", "AutoDeleteMatSu"] == "是"; set => WenConfig["CutRiteConfig", "AutoDeleteMatSu"] = value ? "是" : "否"; }
            public static AutoDeleteMatSuEnum AutoDeleteMatSuE { get => (AutoDeleteMatSuEnum)Enum.Parse(typeof(AutoDeleteMatSuEnum), WenConfig["CutRiteConfig", "AutoDeleteMatSu"]); set => WenConfig["CutRiteConfig", "AutoDeleteMatSu"] = value.ToString(); }
            public enum AutoDeleteMatSuEnum
            {
                是 = 0,
                否 = 1,
            }
        }
        public static class Config
        {
            public static string MatLength { get => WenConfig["Config", "MatLength"]; set => WenConfig["Config", "MatLength"] = value; }
            public static string MatWidth { get => WenConfig["Config", "MatWidth"]; set => WenConfig["Config", "MatWidth"] = value; }
        }
        public static class UpxConfig
        {
            public static string Encoding { get => WenConfig["UpxConfig", "Encoding"]; set => WenConfig["UpxConfig", "Encoding"] = value; }
            public static string IMPPNCODE { get => WenConfig["UpxConfig", "IMPPNCODE"]; set => WenConfig["UpxConfig", "IMPPNCODE"] = value; }
            public static string IMPMATERIAL { get => WenConfig["UpxConfig", "IMPMATERIAL"]; set => WenConfig["UpxConfig", "IMPMATERIAL"] = value; }
            public static string IMPLENGTH { get => WenConfig["UpxConfig", "IMPLENGTH"]; set => WenConfig["UpxConfig", "IMPLENGTH"] = value; }
            public static string IMPWIDTH { get => WenConfig["UpxConfig", "IMPWIDTH"]; set => WenConfig["UpxConfig", "IMPWIDTH"] = value; }
            public static string IMPTHK { get => WenConfig["UpxConfig", "IMPTHK"]; set => WenConfig["UpxConfig", "IMPTHK"] = value; }
            public static string IMPQTY { get => WenConfig["UpxConfig", "IMPQTY"]; set => WenConfig["UpxConfig", "IMPQTY"] = value; }
            public static string IMPGRAIN { get => WenConfig["UpxConfig", "IMPGRAIN"]; set => WenConfig["UpxConfig", "IMPGRAIN"] = value; }
            public static string MatLength { get => WenConfig["UpxConfig", "MatLength"]; set => WenConfig["UpxConfig", "MatLength"] = value; }
            public static string MatWidth { get => WenConfig["UpxConfig", "MatWidth"]; set => WenConfig["UpxConfig", "MatWidth"] = value; }
        }
        public static class SoftwareInfo
        {
            public static string VERSION { get => WenConfig["SoftwareInfo", "VERSION"]; set => WenConfig["SoftwareInfo", "VERSION"] = value; }
            public static string BottomInfo { get => WenConfig["SoftwareInfo", "BottomInfo"]; set => WenConfig["SoftwareInfo", "BottomInfo"] = value; }
            public static string Info { get => WenConfig["SoftwareInfo", "Info"]; set => WenConfig["SoftwareInfo", "Info"] = value; }
        }
    }
}
